Add Mbs driver and region classes#2056
Conversation
…ss config for PV's
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2056 +/- ##
========================================
Coverage 99.12% 99.12%
========================================
Files 336 340 +4
Lines 13082 13216 +134
========================================
+ Hits 12968 13101 +133
- Misses 114 115 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Villtord
left a comment
There was a problem hiding this comment.
I started to review but this is a big change - I got only partially through it.
|
|
||
| _PSU = "PSU_MODE" | ||
|
|
||
| @dataclass |
There was a problem hiding this comment.
Since it's going to be a "true" class variable with potentially no overwriting in each child class - although it's unlikely that we will have both, e.g. specs_driver and mbs_driver in one python environment - but for the sake of clarity this is still a mutable object. That means once changed on specs_driver will also change on mbs_driver. I think you can mark this class as
@dataclass(frozen=True)
class ElectronAnalyserPVConfig:
that will prevent any mutations on it
There was a problem hiding this comment.
yes good idea! I've add this. I'm hoping to remove it in future, it's just a temporarily measure so we can still have working devices without needing to adjust the __init__ method
Fixes #2068. This implements the
MbsRegionandMbsAnalyserDriverIOusing the base electron analyser classes. This has updated the testing framework to be much more flexible, allowing for sequence files to be loaded directly to given regions to tests and paired with other fixtures (e.g associated detector and driver) without needing the files to have same number and named regions.Note: I have removed the image and spectrum pv's from base (for now). This is because Mbs does not use the spectrum like Specs and VGScienta does. I also don't think they are needed from speaking with controls and understanding how the HDF file writer plugin works and will be next bit of work to do once this is complete.
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}